<?
include('../seguridad.php');
include('../bd.php');
include('products_thumbs.php');
Conectar();

// Related Products
$val='';
$key='';
$parent='';
$fields = $_POST['parent'];
if (is_array($fields)) {
	foreach ($fields as $key=>$val) {
		if($val){
$parent.=' '.$val.' ';
		}
	} 
}
$parent.=' z';

if($parent==' z'){$parent='no';}else{$parent=$parent;}

$blog_agregar = "UPDATE products SET promotions='".$parent."' WHERE id='".$_POST[id]."'";
mysql_query($blog_agregar) or die(mysql_error());

header("Location: ../products.php");
?>